Like profile_percent, but averaged over the last 32 frames. It changes about twice a second, so it is steady enough to read.
Works differently on Game Boy - The Game Boy has no frame profiler: profile_enabled says false and every profile number reads 0.
Works differently on Game Boy Color - The Game Boy Color has no frame profiler: profile_enabled says false and every profile number reads 0.
On other consoles this differs: see Side by side and How the consoles differ.
profile_average(phase) -> real| Name | Type |
|---|---|
phase | int |
real
The same number as profile_percent, but averaged over the last 32 frames. It changes about twice a second, which is slow enough to read. This is the one to put on screen.
For the first 32 frames after the game starts, it averages however many frames there have been so far.
for (var i = 1; i <= profile_phases(); i++) {
draw_text(4, 4 + i * 6, $"{profile_name(i)} {int_round(profile_average(i))}");
}Draws every phase's name and its average cost, as a whole number of percent of one frame, one phase to a line.
During the first 32 frames after the game starts it averages however many frames there have been so far.